﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace ProjectNocturnalFool
{
    class UserScreen : UserControl
    {
        public override void LoadContent()
        {
            base.LoadContent();

            width = VirtualScreen.Instance.VirtualWidth;
            height = VirtualScreen.Instance.VirtualHeight;
            x = 0;
            y = 0;
        }

        public override void Draw(GameTime gameTime)
        {            
            Rectangle targetRect = new Rectangle(x, y, width, height);

            TacticsGame.Instance.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.Default, RasterizerState.CullNone);

            TacticsGame.Instance.spriteBatch.Draw(_bgTexture,
                                      targetRect,
                                      null,
                                      Color.Gray,
                                      0,
                                      Vector2.Zero,
                                      SpriteEffects.None,
                                      0);

            TacticsGame.Instance.spriteBatch.End();
            
            base.Draw(gameTime);
        }

    }
}
